/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pclong.aop;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

/**
 *
 * @author Administrator
 */
@Aspect
public class AopTest {

    @Around(value = "execution(* com.aptech.service.*.*(..))")
    public void aroundTest(ProceedingJoinPoint pj) throws Exception, Throwable {
        HttpServletRequest request = SysContent.getRequest();
        HttpServletResponse response = SysContent.getResponse();
        HttpSession session = SysContent.getSession();
        //其他操作
        if (true) {
            pj.proceed();
        }
        throw new Exception("您没有该权限");
    }
}